package com.panda.order.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.panda.common.annotation.Excel;
import com.panda.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 淘宝订单信息对象 t_panda_order_head
 * 
 * @author panda
 * @date 2021-03-14
 */
public class TPandaOrderHead extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 订单ID */
    private String vchcode;

    /** 交易编号 */
    @Excel(name = "订单号")
    private String tid;

    // ============筛选========
    @Excel(name = "店铺名")
    private String storeName;

    @Excel(name = "商品名")
    private String productName;

    /** storeId */
    private String storeId;

    /** 商品图片绝对途径 */
    @Excel(name = "商品图片绝对途径")
    private String picPath;

    /** 实付金额 */
    @Excel(name = "实付金额")
    private BigDecimal payment;

    /** 商品价格 */
    @Excel(name = "商品价格")
    private BigDecimal price;

    /** 邮费 */
    @Excel(name = "邮费")
    private String postFee;

    /** 可以使用trade.promotion_details查询系统优惠系统优惠金额 */
    @Excel(name = "优惠金额")
    private BigDecimal discountFee;

    /** 商品金额（商品价格乘以数量的总金额） */
    @Excel(name = "商品金额", readConverterExp = "商=品价格乘以数量的总金额")
    private BigDecimal totalFee;

    /** 卖家是否已评价 */
    @Excel(name = "卖家是否已评价")
    private String sellerRate;

    /** 卖家发货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "卖家发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date consignTime;

    /** 卖家实际收到的支付宝打款金额  由于子订单可以部分确认收货，这个金额会随着子订单的确认收货而不断增加，交易成功后等于买家实付款减去退款金额）。精确到2位小数;单位:元。如:200.07，表示:200元7分 */
    private BigDecimal receivedPayment;

    /** 	天猫国际官网直供主订单关税税费 */
    private BigDecimal orderTaxFee;

    /** 商品数字编号 */
    @Excel(name = "商品数字编号")
    private String numIid;

    /** 交易类型列表  默认同时查询guarantee_trade, auto_delivery, ec, cod的4种交易类型的数据 可选值 fixed(一口价) auction(拍卖) guarantee_trade(一口价、拍卖) auto_delivery(自动发货) independent_simple_trade(旺店入门版交易) independent_shop_trade(旺店标准版交易) ec(直冲) cod(货到付款) fenxiao(分销) game_equipment(游戏装备) shopex_trade(ShopEX交易) netcn_trade(万网交易) external_trade(统一外部交易)o2o_offlinetrade（O2O交易）step (万人团)nopaid(无付款订单)pre_auth_type(预授权0元购机交易) */
    private String type;

    @Excel(name = "交易类型")
    private String typeShow;


    /** 交易创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "交易创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date created;

    /** 付款时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /** 交易修改时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "交易修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date modified;

    /** 交易结束时间。交易成功时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "交易结束时间。交易成功时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 卖家备注旗帜（与淘宝网上订单的卖家备注旗帜对应，只有卖家才能查看该字段）红、黄、绿、蓝、紫 分别对应 1、2、3、4、5 */
    @Excel(name = "卖家备注旗帜", readConverterExp = "与=淘宝网上订单的卖家备注旗帜对应，只有卖家才能查看该字段")
    private String sellerFlag;

    /** 买家昵称 */
    @Excel(name = "买家昵称")
    private String buyerNick;

    /** 判断订单是否有买家留言，有买家留言返回true，否则返回false */
    private Integer hasBuyerMessage;

    /** 订单出现异常问题的时候，给予用户的描述,没有异常的时候，此值为空 */
    private String markDesc;

    /** 创建交易时的物流方式（交易完成前，物流方式有可能改变，但系统里的这个字段一直不变）。可选值：free(卖家包邮),post(平邮),express(快递),ems(EMS),virtual(虚拟发货)，25(次日必达)，26(预约配送) */
    private String shippingType;

    /** 	卖家手工调整金额 */
    private BigDecimal adjustFee;

    /** 交易内部来源。WAP(手机);HITAO(嗨淘);TOP(TOP平台);TAOBAO(普通淘宝);JHS(聚划算)一笔订单可能同时有以上多个标记，则以逗号分隔 */
    private String tradeFrom;

    /** 买家是否已评价。可选值:true(已评价),false(未评价)。如买家只评价未打分，此字段仍返回false */
    @Excel(name = "买家是否已评价")
    private Integer buyerRate;

    /** 发货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deliveryTime;

    /** 揽收时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "揽收时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date collectTime;

    /** 派送时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "派送时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date dispatchTime;

    /** 签收时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "签收时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date signTime;

    /** 派送CP */
    @Excel(name = "派送CP")
    private String deliveryCps;

    /** 交易状态 */
    private String status;

    @Excel(name = "交易状态")
    private String statusShow;

    private TPandaOrderBuyer orderBuyer;

    private List<TPandaOrderLine> orders;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date start;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date end;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setVchcode(String vchcode) 
    {
        this.vchcode = vchcode;
    }

    public String getVchcode() 
    {
        return vchcode;
    }
    public void setTid(String tid) 
    {
        this.tid = tid;
    }

    public String getTid() 
    {
        return tid;
    }
    public void setPicPath(String picPath) 
    {
        this.picPath = picPath;
    }

    public String getPicPath() 
    {
        return picPath;
    }
    public void setPayment(BigDecimal payment) 
    {
        this.payment = payment;
    }

    public BigDecimal getPayment() 
    {
        return payment;
    }
    public void setSellerRate(String sellerRate) 
    {
        this.sellerRate = sellerRate;
    }

    public String getSellerRate() 
    {
        return sellerRate;
    }
    public void setPostFee(String postFee) 
    {
        this.postFee = postFee;
    }

    public String getPostFee() 
    {
        return postFee;
    }
    public void setConsignTime(Date consignTime) 
    {
        this.consignTime = consignTime;
    }

    public Date getConsignTime() 
    {
        return consignTime;
    }
    public void setReceivedPayment(BigDecimal receivedPayment) 
    {
        this.receivedPayment = receivedPayment;
    }

    public BigDecimal getReceivedPayment() 
    {
        return receivedPayment;
    }
    public void setOrderTaxFee(BigDecimal orderTaxFee) 
    {
        this.orderTaxFee = orderTaxFee;
    }

    public BigDecimal getOrderTaxFee() 
    {
        return orderTaxFee;
    }
    public void setNumIid(String numIid) 
    {
        this.numIid = numIid;
    }

    public String getNumIid() 
    {
        return numIid;
    }
    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }
    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }
    public void setDiscountFee(BigDecimal discountFee) 
    {
        this.discountFee = discountFee;
    }

    public BigDecimal getDiscountFee() 
    {
        return discountFee;
    }
    public void setTotalFee(BigDecimal totalFee) 
    {
        this.totalFee = totalFee;
    }

    public BigDecimal getTotalFee() 
    {
        return totalFee;
    }
    public void setCreated(Date created) 
    {
        this.created = created;
    }

    public Date getCreated() 
    {
        return created;
    }
    public void setPayTime(Date payTime) 
    {
        this.payTime = payTime;
    }

    public Date getPayTime() 
    {
        return payTime;
    }
    public void setModified(Date modified) 
    {
        this.modified = modified;
    }

    public Date getModified() 
    {
        return modified;
    }
    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }
    public void setSellerFlag(String sellerFlag) 
    {
        this.sellerFlag = sellerFlag;
    }

    public String getSellerFlag() 
    {
        return sellerFlag;
    }
    public void setBuyerNick(String buyerNick) 
    {
        this.buyerNick = buyerNick;
    }

    public String getBuyerNick() 
    {
        return buyerNick;
    }
    public void setHasBuyerMessage(Integer hasBuyerMessage) 
    {
        this.hasBuyerMessage = hasBuyerMessage;
    }

    public Integer getHasBuyerMessage() 
    {
        return hasBuyerMessage;
    }
    public void setMarkDesc(String markDesc) 
    {
        this.markDesc = markDesc;
    }

    public String getMarkDesc() 
    {
        return markDesc;
    }
    public void setShippingType(String shippingType) 
    {
        this.shippingType = shippingType;
    }

    public String getShippingType() 
    {
        return shippingType;
    }
    public void setAdjustFee(BigDecimal adjustFee) 
    {
        this.adjustFee = adjustFee;
    }

    public BigDecimal getAdjustFee() 
    {
        return adjustFee;
    }
    public void setTradeFrom(String tradeFrom) 
    {
        this.tradeFrom = tradeFrom;
    }

    public String getTradeFrom() 
    {
        return tradeFrom;
    }
    public void setBuyerRate(Integer buyerRate) 
    {
        this.buyerRate = buyerRate;
    }

    public Integer getBuyerRate() 
    {
        return buyerRate;
    }
    public void setDeliveryTime(Date deliveryTime) 
    {
        this.deliveryTime = deliveryTime;
    }

    public Date getDeliveryTime() 
    {
        return deliveryTime;
    }
    public void setCollectTime(Date collectTime) 
    {
        this.collectTime = collectTime;
    }

    public Date getCollectTime() 
    {
        return collectTime;
    }
    public void setDispatchTime(Date dispatchTime) 
    {
        this.dispatchTime = dispatchTime;
    }

    public Date getDispatchTime() 
    {
        return dispatchTime;
    }
    public void setSignTime(Date signTime) 
    {
        this.signTime = signTime;
    }

    public Date getSignTime() 
    {
        return signTime;
    }
    public void setDeliveryCps(String deliveryCps) 
    {
        this.deliveryCps = deliveryCps;
    }

    public String getDeliveryCps() 
    {
        return deliveryCps;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("vchcode", getVchcode())
            .append("tid", getTid())
            .append("picPath", getPicPath())
            .append("payment", getPayment())
            .append("sellerRate", getSellerRate())
            .append("postFee", getPostFee())
            .append("consignTime", getConsignTime())
            .append("receivedPayment", getReceivedPayment())
            .append("orderTaxFee", getOrderTaxFee())
            .append("numIid", getNumIid())
            .append("type", getType())
            .append("price", getPrice())
            .append("discountFee", getDiscountFee())
            .append("totalFee", getTotalFee())
            .append("created", getCreated())
            .append("payTime", getPayTime())
            .append("modified", getModified())
            .append("endTime", getEndTime())
            .append("sellerFlag", getSellerFlag())
            .append("buyerNick", getBuyerNick())
            .append("hasBuyerMessage", getHasBuyerMessage())
            .append("markDesc", getMarkDesc())
            .append("shippingType", getShippingType())
            .append("adjustFee", getAdjustFee())
            .append("tradeFrom", getTradeFrom())
            .append("buyerRate", getBuyerRate())
            .append("deliveryTime", getDeliveryTime())
            .append("collectTime", getCollectTime())
            .append("dispatchTime", getDispatchTime())
            .append("signTime", getSignTime())
            .append("deliveryCps", getDeliveryCps())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }

    public TPandaOrderBuyer getOrderBuyer() {
        return orderBuyer;
    }

    public void setOrderBuyer(TPandaOrderBuyer orderBuyer) {
        this.orderBuyer = orderBuyer;
    }

    public List<TPandaOrderLine> getOrders() {
        return orders;
    }

    public void setOrders(List<TPandaOrderLine> orders) {
        this.orders = orders;
    }

    public String getStoreId() {
        return storeId;
    }

    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }

    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    public Date getStart() {
        return start;
    }

    public void setStart(Date start) {
        this.start = start;
    }

    public Date getEnd() {
        return end;
    }

    public void setEnd(Date end) {
        this.end = end;
    }

    public String getTypeShow() {
        return typeShow;
    }

    public void setTypeShow(String typeShow) {
        this.typeShow = typeShow;
    }

    public String getStatusShow() {
        return statusShow;
    }

    public void setStatusShow(String statusShow) {
        this.statusShow = statusShow;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }
}
